package com.cuit.xsc.weishare.util;

import java.util.Comparator;

import com.cuit.xsc.weishare.model.DirectMessage;

public class DirectMessageComparator implements Comparator<DirectMessage>
{

	@Override
	public int compare(DirectMessage lhs, DirectMessage rhs)
	{
		if (lhs != null && rhs != null)
		{
			return (int) (lhs.getTime() - rhs.getTime());
		}
		
		return 0;
	}

}
